<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isErrorPage="true" %>
<%
	request.setCharacterEncoding("UTF-8");
	response.setCharacterEncoding("UTF-8");
	if("POST".equals(request.getMethod())){
		Cookie usernameCookie = new Cookie("username",request.getParameter("username"));
		Cookie visittimesCookie = new Cookie("visitTimes","0");
		response.addCookie(usernameCookie);
		response.addCookie(visittimesCookie);
		response.sendRedirect(request.getContextPath() + "/1201/Cookie.jsp");
		return;
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>登录吧！</title>
</head>
<body>
<form action="login.jsp" method="post">
	错误信息：<%= exception.getMessage() %>
	<ul>
		<li>用户名：<input type="text" name="username" /></li>
		<li>登录：<input type="submit" value="登录"  /></li>
	</ul>
</form>
</body>
</html>